#region Usings
using Lib.ApplicationBlocks.DbBlocks.Membership;
using Lib.Data.ORM.Entity;
using Lib.Data.ORM.EntityManagement;
#endregion

namespace BK.Entities
{
	[MappedEntity(TableName = "Users")]
	public class UserEntity : BaseEntity<IdentifierInt>, IMembership
	{
		#region Instance Properties
		[MappedKey(IsPrimaryKey = true, IsIdentity = true, ValuePropertyName = "Id.Value")]
		public override IdentifierInt Id
		{
			get { return base.Id; }
		}

		[MappedProperty]
		public string Email { get; set; }

		[MappedProperty]
		public string FirstName { get; set; }

		[MappedProperty]
		public string LastName { get; set; }
		#endregion

		#region IMembership Members
		[MappedProperty]
		public string Login { get; set; }

		int? IMembership.Id
		{
			get { return Id.Value; }
		}

		[MappedProperty]
		public string Password { get; set; }

		[MappedProperty]
		public string CultureName { get; set; }

		[MappedProperty]
		public string LocaleName { get; set; }
		#endregion
	}
}